package com.kuang.dao;

import com.kuang.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Repository
//@Mapper
public interface UserMapper {

    public User selectUserByNameAndPwd(@Param("username") String username, @Param("password") String password);

    public User selectUser();

    //     修改用户
    public int updateUser(User user);

    //    ajax 验证密码
    public User checkOldPwd(String oldpwd);

    public int updatepwd(@Param("password") String password, @Param("id") Integer id, @Param("updatetime") Date updatetime);


    // 查出管理员
    public User selectAdminUser(Integer id);
}
